<!DOCTYPE html>
<html lang="en-US">
    <head>
        <title>Test::Exception - Test exception-based code - metacpan.org</title>
        <link rel="preload" as="fetch" href="https://metacpan.org/account/login_status" crossorigin="anonymous" />
        <link href="https://metacpan.org/_assets/b8ccceeed47a0652049703d99326a9cea4933443.css" rel="stylesheet" type="text/css">
        <script src="https://metacpan.org/_assets/6bfedafe2d7caa915b7d84f61b45936818e3242e.js" type="text/javascript" defer></script>
        <link rel="alternate" type="application/rss+xml" title="Recent CPAN Uploads of Test-Exception - MetaCPAN" href="https://metacpan.org/dist/Test-Exception/releases.rss" />
        <link rel="canonical" href="./Test::Exception.html" />
        <meta name="description" content="Test exception-based code" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
        <link rel="shortcut icon" href="https://metacpan.org/static/icons/favicon.ico">
        <link rel="apple-touch-icon" sizes="152x152" href="https://metacpan.org/static/icons/apple-touch-icon.png">
        <link rel="search" href="https://metacpan.org/static/opensearch.xml" type="application/opensearchdescription+xml" title="MetaCPAN">
        <script>
          (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
          })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

          (function(skey, ga_id){
            ga('create', ga_id, {
              siteSpeedSampleRate : 100,
              storage             : 'none',
              clientId            : localStorage.getItem(skey)
            });
            ga(function(tracker) {
              localStorage.setItem(skey, tracker.get('clientId'));
            });
            ga('send', 'pageview');
          })('ga:clientId', 'UA-27829474-1');
        </script>
<meta name="twitter:card"        content="summary" />
<meta name="twitter:url"         content="https://metacpan.org/pod/Test::Exception" />
<meta name="twitter:title"       content="Test::Exception" />
<meta name="twitter:description" content="Test exception-based code" />
<meta name="twitter:site"        content="metacpan" />
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="header-logo-large hidden-xs">
              <a href="https://metacpan.org/" tabindex="0">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#logo" />
                </svg>
              </a>
            </div>
            <div class="header-logo-icon visible-xs">
              <a href="https://metacpan.org/">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#dots" />
                </svg>
              </a>
            </div>
            <ul class="nav navbar-nav menu-items hidden-xs hidden-sm">
              <li><a href="https://metacpan.org/about">About</a></li>
              <li><a href="https://metacpan.org/about/sponsors">Sponsor</a></li>
              <li><a href="https://grep.metacpan.org/">grep::cpan</a></li>
              <li><a href="https://metacpan.org/recent">Recent</a></li>
              <li><a href="https://metacpan.org/about/faq">FAQ</a></li>
              <li><a href="https://metacpan.org/tools">Tools</a></li>
              <li><a href="https://fastapi.metacpan.org/">API</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <button type="button" class="searchbar-btn visible-xs visible-sm">
                    <i class="fa fa-search button-fa-icon"></i>
                </button>
                <form action="https://metacpan.org/search" class="searchbar-form visible-md visible-lg search-form form-horizontal">
                   <input type="hidden" name="size" id="metacpan_search-size" value="20">
                  <div class="form-group">
                      <div class="search-group">
                        <i class="fa fa-search"></i>
                        <input type="text" name="q" placeholder="Search the CPAN" size="41" autocorrect="off" autocapitalize="off" spellcheck="false" id="metacpan_search-input" class="form-control" value="">
                      </div>
                  </div>
                </form>
                    <li class="icon-slidepanel visible-xs visible-sm">
                      <button data-toggle="slidepanel" data-target=".slidepanel">
                        <span class="button-fa-icon">
                          <i class="fa fa-bars slidepanel-open"></i>
                          <i class="fa fa-times slidepanel-close"></i>
                        </span>
                      </button>
                    </li>
                <form action="https://metacpan.org/account/logout" method="POST" id="metacpan-logout"></form>
                <li class="dropdown logged_in" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon logged-in-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li><a href="https://metacpan.org/account/identities">Identities</a></li>
                        <li><a href="https://metacpan.org/account/profile">Profile</a></li>
                        <li><a href="https://metacpan.org/account/favorite/list">Favorites</a></li>
                        <li>
                            <a href="./Test::Exception.html#" type="button" onclick="$('#metacpan-logout').submit(); return false">
                              Logout
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_out" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li>
                            <a href="https://metacpan.org/login/github">
                                <i class="fab fa-github fa-fw"></i>
                                GitHub
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/twitter">
                                <i class="fab fa-twitter fa-fw"></i>
                                Twitter
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/google">
                                <i class="fab fa-google fa-fw"></i>
                                Google
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_placeholder">
                    <button>
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                    </button>
                </li>
            </ul>
        </nav>
        <div class="page-content ">
          <!--
          <div class="top-notify-banner">
            <i class="fas fa-info-circle"></i>
          </div>
          -->
          <nav class="sidebar">
            <div class="slidepanel">
              <ul class="nav-list ">
    <li class="nav-header no-margin-top">
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The date that this version of Test-Exception was released.">
      <span class="relatize">29 Dec 2015 19:55:14 UTC</span>
    </li>
  <li>
    Distribution: <a href="https://metacpan.org/dist/Test-Exception">Test-Exception</a>
  </li>
  <li>
    Module version: 0.43
  </li>
  <li>
    <a data-keyboard-shortcut="g s" href="https://metacpan.org/dist/Test-Exception/source/lib/Test/Exception.pm">Source</a>
    (<a href="https://metacpan.org/dist/Test-Exception/source/lib/Test/Exception.pm?raw=1">raw</a>)
  </li>
  <li>
    <a data-keyboard-shortcut="g b" href="https://metacpan.org/dist/Test-Exception/source/lib/Test">Browse</a>
    (<a href="https://metacpan.org/dist/Test-Exception/source/lib/Test?raw=1">raw</a>)
  </li>
    <li>
      <a data-keyboard-shortcut="g c" href="https://metacpan.org/dist/Test-Exception/changes">Changes</a>
    </li>
    <li>
      <a rel="noopener nofollow" class="nopopup" href="https://github.com/Test-More/test-exception">Homepage</a>
    </li>
    <li>
      <a class="nopopup" href="https://metacpan.org/dist/Test-Exception/contribute">How to Contribute</a>
    </li>
    <li>
        <a rel="noopener nofollow" data-keyboard-shortcut="g r" href="https://github.com/Test-More/test-exception">Repository</a>
    </li>
    <li>
      <a rel="noopener nofollow" data-keyboard-shortcut="g i" href="https://github.com/Test-More/test-exception/issues">Issues</a>
      (4)
    </li>
    <li>
      <a rel="noopener nofollow" href="http://matrix.cpantesters.org/?dist=Test-Exception+0.43" title="Matrix">Testers</a>
        <span title="(pass / fail / na)">(<a rel="noopener nofollow" href="https://www.cpantesters.org/distro/T/Test-Exception.html?oncpan=1&amp;distmat=1&amp;version=0.43&amp;grade=2" style="color: #090">1712</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/T/Test-Exception.html?oncpan=1&amp;distmat=1&amp;version=0.43&amp;grade=3" style="color: #900">1</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/T/Test-Exception.html?oncpan=1&amp;distmat=1&amp;version=0.43&amp;grade=4">0</a>)</span>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpants.cpanauthors.org/release/EXODIST/Test-Exception-0.43">Kwalitee</a>
    </li>
    <li>
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The # people with an indexing permission on Test-Exception who have released something to CPAN in the last 2 years (i.e. the # people likely able to release critical fixes in a timely manner)">
      Bus factor: 8
      </div>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpancover.com/latest/Test-Exception-0.43/index.html">95.06% Coverage </a>
    </li>
    <li>
      License: perl_5
    </li>
    <li>
      Perl: v5.6.1
    </li>
    <li class="nav-header">Activity</li>
    <li>
<div class="activity-graph">
    <img src="https://metacpan.org/dist/Test-Exception/activity.svg?res=month" />
    <div class="comment">24 month</div>
</div>
    </li>
    <li class="nav-header">Tools</li>
    <li>
      <a itemprop="downloadUrl" href="https://cpan.metacpan.org/authors/id/E/EX/EXODIST/Test-Exception-0.43.tar.gz">
      Download (<span itemprop="fileSize">14.85KB</span>)</a>
    </li>
    <li>
      <a href="https://explorer.metacpan.org/?url=%2Fmodule%2FEXODIST%2FTest-Exception-0.43%2Flib%2FTest%2FException.pm">
        MetaCPAN Explorer
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/Test-Exception/permissions">
        Permissions
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/Test-Exception/releases.rss">
        Subscribe to distribution
      </a>
    </li>
    <li>
      <button class="btn btn-link" data-toggle="modal" data-target="#metacpan_install-instructions-dialog">
        Install Instructions
      </button>
    </li>
    <li>
      <form action="https://metacpan.org/search">
        <input type="hidden" name="q" value="dist:Test-Exception">
        <input type="search" name="q" placeholder="Search distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
      </form>
    </li>
    <li>
      <form action="https://grep.metacpan.org/search">
        <input type="hidden" name="qd" value="Test-Exception">
        <input type="hidden" name="source" value="metacpan">
        <input type="search" name="q" placeholder="grep distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
     </form>
    </li>
    <li class="version-jump">
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/Test/Exception.pm&#39;" class="form-control tool-bar-form">
  <option disabled selected>Jump to version</option>
<option
  disabled
  value="EXODIST/Test-Exception-0.43"
>0.43
  (EXODIST on 2015-12-29)</option>
<option
  
  value="ETHER/Test-Exception-0.38"
>0.38
  (ETHER on 2015-02-28)</option>
<option
  
  value="ADIE/Test-Exception-0.32"
>0.32
  (ADIE on 2013-04-28)</option>
<option
  
  value="ADIE/Test-Exception-0.31"
>0.31
  (ADIE on 2010-10-10)</option>
<option
  
  value="ADIE/Test-Exception-0.30_2"
>0.30_2 DEV
  (ADIE on 2010-10-06)</option>
<option
  
  value="ADIE/Test-Exception-0.30_1"
>0.30_1 DEV
  (ADIE on 2010-10-04)</option>
<option
  
  value="ADIE/Test-Exception-0.29"
>0.29
  (ADIE on 2010-01-12)</option>
<option
  
  value="ADIE/Test-Exception-0.27"
>0.27
  (ADIE on 2008-02-16)</option>
<option
  
  value="ADIE/Test-Exception-0.26"
>0.26
  (ADIE on 2007-12-10)</option>
<optgroup label="BackPAN">'
<option
  
  value="EXODIST/Test-Exception-0.42_1"
>0.42_1 DEV
  (EXODIST on 2015-12-29)</option>
<option
  
  value="EXODIST/Test-Exception-0.41"
>0.41
  (EXODIST on 2015-12-21)</option>
<option
  
  value="EXODIST/Test-Exception-0.40"
>0.40
  (EXODIST on 2015-06-06)</option>
<option
  
  value="EXODIST/Test-Exception-0.39"
>0.39
  (EXODIST on 2015-06-04)</option>
<option
  
  value="ETHER/Test-Exception-0.37"
>0.37
  (ETHER on 2015-02-28)</option>
<option
  
  value="EXODIST/Test-Exception-0.36"
>0.36
  (EXODIST on 2015-01-08)</option>
<option
  
  value="EXODIST/Test-Exception-0.35"
>0.35
  (EXODIST on 2014-09-20)</option>
<option
  
  value="EXODIST/Test-Exception-0.34"
>0.34
  (EXODIST on 2014-09-20)</option>
<option
  
  value="EXODIST/Test-Exception-0.33"
>0.33
  (EXODIST on 2014-09-20)</option>
<option
  
  value="RJBS/Test-Exception-0.28_01"
>0.28_01 DEV
  (RJBS on 2009-12-21)</option>
<option
  
  value="BDFOY/Test-Exception-0.27_04"
>0.27_04 DEV
  (BDFOY on 2009-09-21)</option>
<option
  
  value="BDFOY/Test-Exception-0.27_03"
>0.27_03 DEV
  (BDFOY on 2009-09-18)</option>
<option
  
  value="BDFOY/Test-Exception-0.27_02"
>0.27_02 DEV
  (BDFOY on 2009-09-17)</option>
<option
  
  value="BDFOY/Test-Exception-0.27_01"
>0.27_01 DEV
  (BDFOY on 2009-09-16)</option>
<option
  
  value="ADIE/Test-Exception-0.25"
>0.25
  (ADIE on 2007-02-15)</option>
<option
  
  value="ADIE/Test-Exception-0.24"
>0.24
  (ADIE on 2006-10-10)</option>
<option
  
  value="ADIE/Test-Exception-0.23"
>0.23
  (ADIE on 2006-10-06)</option>
<option
  
  value="ADIE/Test-Exception-0.22"
>0.22
  (ADIE on 2006-09-01)</option>
<option
  
  value="ADIE/Test-Exception-0.21"
>0.21
  (ADIE on 2005-06-05)</option>
<option
  
  value="ADIE/Test-Exception-0.20"
>0.20
  (ADIE on 2004-08-28)</option>
<option
  
  value="ADIE/Test-Exception-0.19"
>0.19
  (ADIE on 2004-08-15)</option>
<option
  
  value="ADIE/Test-Exception-0.18"
>0.18
  (ADIE on 2004-08-11)</option>
<option
  
  value="ADIE/Test-Exception-0.17"
>0.17
  (ADIE on 2004-07-30)</option>
<option
  
  value="ADIE/Test-Exception-0.15"
>0.15
  (ADIE on 2003-01-30)</option>
<option
  
  value="ADIE/Test-Exception-0.13"
>0.13
  (ADIE on 2003-01-06)</option>
<option
  
  value="ADIE/Test-Exception-0.12"
>0.12
  (ADIE on 2002-08-26)</option>
<option
  
  value="ADIE/Test-Exception-0.11"
>0.11
  (ADIE on 2002-06-29)</option>
<option
  
  value="ADIE/Test-Exception-0.10"
>0.10
  (ADIE on 2002-06-02)</option>
<option
  
  value="ADIE/Test-Exception-0.09"
>0.09
  (ADIE on 2002-06-01)</option>
<option
  
  value="ADIE/Test-Exception-0.07"
>0.07
  (ADIE on 2002-04-12)</option>
</optgroup>
</select>
    </li>
    <li class="version-diff">
<select onchange="document.location.href='/release/EXODIST/Test-Exception-0.43/diff/' + encodeURIComponent(this.value) + '/lib/Test/Exception.pm'
" class="form-control tool-bar-form">
  <option disabled selected>Diff with version</option>
<option
  disabled
  value="EXODIST/Test-Exception-0.43"
>0.43
  (EXODIST on 2015-12-29)</option>
<option
  
  value="ETHER/Test-Exception-0.38"
>0.38
  (ETHER on 2015-02-28)</option>
<option
  
  value="ADIE/Test-Exception-0.32"
>0.32
  (ADIE on 2013-04-28)</option>
<option
  
  value="ADIE/Test-Exception-0.31"
>0.31
  (ADIE on 2010-10-10)</option>
<option
  
  value="ADIE/Test-Exception-0.30_2"
>0.30_2 DEV
  (ADIE on 2010-10-06)</option>
<option
  
  value="ADIE/Test-Exception-0.30_1"
>0.30_1 DEV
  (ADIE on 2010-10-04)</option>
<option
  
  value="ADIE/Test-Exception-0.29"
>0.29
  (ADIE on 2010-01-12)</option>
<option
  
  value="ADIE/Test-Exception-0.27"
>0.27
  (ADIE on 2008-02-16)</option>
<option
  
  value="ADIE/Test-Exception-0.26"
>0.26
  (ADIE on 2007-12-10)</option>
<optgroup label="BackPAN">'
<option
  
  value="EXODIST/Test-Exception-0.42_1"
>0.42_1 DEV
  (EXODIST on 2015-12-29)</option>
<option
  
  value="EXODIST/Test-Exception-0.41"
>0.41
  (EXODIST on 2015-12-21)</option>
<option
  
  value="EXODIST/Test-Exception-0.40"
>0.40
  (EXODIST on 2015-06-06)</option>
<option
  
  value="EXODIST/Test-Exception-0.39"
>0.39
  (EXODIST on 2015-06-04)</option>
<option
  
  value="ETHER/Test-Exception-0.37"
>0.37
  (ETHER on 2015-02-28)</option>
<option
  
  value="EXODIST/Test-Exception-0.36"
>0.36
  (EXODIST on 2015-01-08)</option>
<option
  
  value="EXODIST/Test-Exception-0.35"
>0.35
  (EXODIST on 2014-09-20)</option>
<option
  
  value="EXODIST/Test-Exception-0.34"
>0.34
  (EXODIST on 2014-09-20)</option>
<option
  
  value="EXODIST/Test-Exception-0.33"
>0.33
  (EXODIST on 2014-09-20)</option>
<option
  
  value="RJBS/Test-Exception-0.28_01"
>0.28_01 DEV
  (RJBS on 2009-12-21)</option>
<option
  
  value="BDFOY/Test-Exception-0.27_04"
>0.27_04 DEV
  (BDFOY on 2009-09-21)</option>
<option
  
  value="BDFOY/Test-Exception-0.27_03"
>0.27_03 DEV
  (BDFOY on 2009-09-18)</option>
<option
  
  value="BDFOY/Test-Exception-0.27_02"
>0.27_02 DEV
  (BDFOY on 2009-09-17)</option>
<option
  
  value="BDFOY/Test-Exception-0.27_01"
>0.27_01 DEV
  (BDFOY on 2009-09-16)</option>
<option
  
  value="ADIE/Test-Exception-0.25"
>0.25
  (ADIE on 2007-02-15)</option>
<option
  
  value="ADIE/Test-Exception-0.24"
>0.24
  (ADIE on 2006-10-10)</option>
<option
  
  value="ADIE/Test-Exception-0.23"
>0.23
  (ADIE on 2006-10-06)</option>
<option
  
  value="ADIE/Test-Exception-0.22"
>0.22
  (ADIE on 2006-09-01)</option>
<option
  
  value="ADIE/Test-Exception-0.21"
>0.21
  (ADIE on 2005-06-05)</option>
<option
  
  value="ADIE/Test-Exception-0.20"
>0.20
  (ADIE on 2004-08-28)</option>
<option
  
  value="ADIE/Test-Exception-0.19"
>0.19
  (ADIE on 2004-08-15)</option>
<option
  
  value="ADIE/Test-Exception-0.18"
>0.18
  (ADIE on 2004-08-11)</option>
<option
  
  value="ADIE/Test-Exception-0.17"
>0.17
  (ADIE on 2004-07-30)</option>
<option
  
  value="ADIE/Test-Exception-0.15"
>0.15
  (ADIE on 2003-01-30)</option>
<option
  
  value="ADIE/Test-Exception-0.13"
>0.13
  (ADIE on 2003-01-06)</option>
<option
  
  value="ADIE/Test-Exception-0.12"
>0.12
  (ADIE on 2002-08-26)</option>
<option
  
  value="ADIE/Test-Exception-0.11"
>0.11
  (ADIE on 2002-06-29)</option>
<option
  
  value="ADIE/Test-Exception-0.10"
>0.10
  (ADIE on 2002-06-02)</option>
<option
  
  value="ADIE/Test-Exception-0.09"
>0.09
  (ADIE on 2002-06-01)</option>
<option
  
  value="ADIE/Test-Exception-0.07"
>0.07
  (ADIE on 2002-04-12)</option>
</optgroup>
</select>
    </li>

    <li>
<ul class="dependencies">
  <li class="nav-header">Dependencies</li>
  <li><a href="https://metacpan.org/pod/Carp" title="Carp" class="ellipsis">Carp</a></li>
  <li><a href="https://metacpan.org/pod/Exporter" title="Exporter" class="ellipsis">Exporter</a></li>
  <li><a href="https://metacpan.org/pod/Sub::Uplevel" title="Sub::Uplevel" class="ellipsis">Sub::Uplevel</a></li>
  <li><a href="https://metacpan.org/pod/Test::Builder" title="Test::Builder" class="ellipsis">Test::Builder</a></li>
  <li><a href="https://metacpan.org/pod/Test::Builder::Tester" title="Test::Builder::Tester" class="ellipsis">Test::Builder::Tester</a></li>
  <li><a href="https://metacpan.org/pod/Test::Harness" title="Test::Harness" class="ellipsis">Test::Harness</a></li>
  <li><a href="https://metacpan.org/pod/base" title="base" class="ellipsis">base</a></li>
  <li><a href="https://metacpan.org/pod/strict" title="strict" class="ellipsis">strict</a></li>
  <li><a href="https://metacpan.org/pod/warnings" title="warnings" class="ellipsis">warnings</a></li>
  <li>
    <hr>
  </li>
  <li>
    <a href="https://metacpan.org/module/Test::Exception/requires">Reverse dependencies</a>
  </li>
  <li>
    <a href="http://deps.cpantesters.org/?module=Test%3A%3AException">CPAN Testers List</a>
  </li>
  <li>
    <a href="https://cpandeps.grinnz.com/?dist=Test-Exception">Dependency graph</a>
  </li>
</ul>
    </li>
    <li class="nav-header">Permalinks</li>
    <li>
      <a href="https://metacpan.org/release/EXODIST/Test-Exception-0.43/view/lib/Test/Exception.pm">This version</a>
    </li>
    <li>
      <a href="./Test::Exception.html">Latest version</a>
    </li>
    <li>
<div class="plussers">
<div class="nav-header">++ed by:</div>
<div>
<a class="display-all" href="https://metacpan.org/author/ARJONES"><img src="https://www.gravatar.com/avatar/779fdd029141571e2650d9060978c1a1?d=identicon&amp;s=20" title="ARJONES" alt="ARJONES"></a>
<a class="display-all" href="https://metacpan.org/author/PERLOVER"><img src="https://www.gravatar.com/avatar/b53aa7bcfa37c472dd788bb80f68c3fc?d=identicon&amp;s=20" title="PERLOVER" alt="PERLOVER"></a>
<a class="display-all" href="https://metacpan.org/author/DBOEHMER"><img src="https://www.gravatar.com/avatar/220fbe10dba79664fe84771d5ea32763?d=identicon&amp;s=20" title="DBOEHMER" alt="DBOEHMER"></a>
<a class="display-all" href="https://metacpan.org/author/KEEDI"><img src="https://www.gravatar.com/avatar/95f905a7a4ccc573c711e9d264c0fde8?d=identicon&amp;s=20" title="KEEDI" alt="KEEDI"></a>
<a class="display-all" href="https://metacpan.org/author/LUKAST"><img src="https://www.gravatar.com/avatar/befd90fe1bec8d75ae9c4938a0f28861?d=identicon&amp;s=20" title="LUKAST" alt="LUKAST"></a>
</div>
<!-- Display counts of plussers-->
<div>
    <a href="https://metacpan.org/dist/Test-Exception/plussers">19 PAUSE users</a>
</div>
<div>
    22 non-PAUSE users
</div>
</div>
    </li>
    <li>
<div id="metacpan_contributors">
  <div>
    <button class="btn-link"
      onclick="$(this).hide(); $('#metacpan_contributors ul').slideDown(); return false;"
    >and 1 contributors</button>
  </div>
  <ul style="display: none">
    <li class="contributor"
      data-cpan-author="ADIE"
      data-contrib-email="adrianh@quietstars.com"
    >
      <a href="https://metacpan.org/author/ADIE" class="cpan-author">
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d3141bf2e7d23832a2ae5bf766def2fc?d=identicon&amp;s=20" />
      Adrian Howard
      </a>
    </li>
  </ul>
</div>
    </li>
              </ul>
            </div>
          </nav>
          <div class="content-navigation">
<div class="breadcrumbs">
  <span>
    <a data-keyboard-shortcut="g a" rel="author" href="https://metacpan.org/author/EXODIST" class="author-name">Chad Granum</a>
  </span>
  <span>&nbsp;/&nbsp;</span>
  <div class="release dist-release status-latest maturity-released">
    <span class="dropdown"><b class="caret"></b></span>
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/Test/Exception.pm&#39;" class="">
<option
  selected
  value="EXODIST/Test-Exception-0.43"
>0.43
  (EXODIST on 2015-12-29)</option>
<option
  
  value="ETHER/Test-Exception-0.38"
>0.38
  (ETHER on 2015-02-28)</option>
<option
  
  value="ADIE/Test-Exception-0.32"
>0.32
  (ADIE on 2013-04-28)</option>
<option
  
  value="ADIE/Test-Exception-0.31"
>0.31
  (ADIE on 2010-10-10)</option>
<option
  
  value="ADIE/Test-Exception-0.30_2"
>0.30_2 DEV
  (ADIE on 2010-10-06)</option>
<option
  
  value="ADIE/Test-Exception-0.30_1"
>0.30_1 DEV
  (ADIE on 2010-10-04)</option>
<option
  
  value="ADIE/Test-Exception-0.29"
>0.29
  (ADIE on 2010-01-12)</option>
<option
  
  value="ADIE/Test-Exception-0.27"
>0.27
  (ADIE on 2008-02-16)</option>
<option
  
  value="ADIE/Test-Exception-0.26"
>0.26
  (ADIE on 2007-12-10)</option>
<optgroup label="BackPAN">'
<option
  
  value="EXODIST/Test-Exception-0.42_1"
>0.42_1 DEV
  (EXODIST on 2015-12-29)</option>
<option
  
  value="EXODIST/Test-Exception-0.41"
>0.41
  (EXODIST on 2015-12-21)</option>
<option
  
  value="EXODIST/Test-Exception-0.40"
>0.40
  (EXODIST on 2015-06-06)</option>
<option
  
  value="EXODIST/Test-Exception-0.39"
>0.39
  (EXODIST on 2015-06-04)</option>
<option
  
  value="ETHER/Test-Exception-0.37"
>0.37
  (ETHER on 2015-02-28)</option>
<option
  
  value="EXODIST/Test-Exception-0.36"
>0.36
  (EXODIST on 2015-01-08)</option>
<option
  
  value="EXODIST/Test-Exception-0.35"
>0.35
  (EXODIST on 2014-09-20)</option>
<option
  
  value="EXODIST/Test-Exception-0.34"
>0.34
  (EXODIST on 2014-09-20)</option>
<option
  
  value="EXODIST/Test-Exception-0.33"
>0.33
  (EXODIST on 2014-09-20)</option>
<option
  
  value="RJBS/Test-Exception-0.28_01"
>0.28_01 DEV
  (RJBS on 2009-12-21)</option>
<option
  
  value="BDFOY/Test-Exception-0.27_04"
>0.27_04 DEV
  (BDFOY on 2009-09-21)</option>
<option
  
  value="BDFOY/Test-Exception-0.27_03"
>0.27_03 DEV
  (BDFOY on 2009-09-18)</option>
<option
  
  value="BDFOY/Test-Exception-0.27_02"
>0.27_02 DEV
  (BDFOY on 2009-09-17)</option>
<option
  
  value="BDFOY/Test-Exception-0.27_01"
>0.27_01 DEV
  (BDFOY on 2009-09-16)</option>
<option
  
  value="ADIE/Test-Exception-0.25"
>0.25
  (ADIE on 2007-02-15)</option>
<option
  
  value="ADIE/Test-Exception-0.24"
>0.24
  (ADIE on 2006-10-10)</option>
<option
  
  value="ADIE/Test-Exception-0.23"
>0.23
  (ADIE on 2006-10-06)</option>
<option
  
  value="ADIE/Test-Exception-0.22"
>0.22
  (ADIE on 2006-09-01)</option>
<option
  
  value="ADIE/Test-Exception-0.21"
>0.21
  (ADIE on 2005-06-05)</option>
<option
  
  value="ADIE/Test-Exception-0.20"
>0.20
  (ADIE on 2004-08-28)</option>
<option
  
  value="ADIE/Test-Exception-0.19"
>0.19
  (ADIE on 2004-08-15)</option>
<option
  
  value="ADIE/Test-Exception-0.18"
>0.18
  (ADIE on 2004-08-11)</option>
<option
  
  value="ADIE/Test-Exception-0.17"
>0.17
  (ADIE on 2004-07-30)</option>
<option
  
  value="ADIE/Test-Exception-0.15"
>0.15
  (ADIE on 2003-01-30)</option>
<option
  
  value="ADIE/Test-Exception-0.13"
>0.13
  (ADIE on 2003-01-06)</option>
<option
  
  value="ADIE/Test-Exception-0.12"
>0.12
  (ADIE on 2002-08-26)</option>
<option
  
  value="ADIE/Test-Exception-0.11"
>0.11
  (ADIE on 2002-06-29)</option>
<option
  
  value="ADIE/Test-Exception-0.10"
>0.10
  (ADIE on 2002-06-02)</option>
<option
  
  value="ADIE/Test-Exception-0.09"
>0.09
  (ADIE on 2002-06-01)</option>
<option
  
  value="ADIE/Test-Exception-0.07"
>0.07
  (ADIE on 2002-04-12)</option>
</optgroup>
</select>
    <a data-keyboard-shortcut="g d" class="release-name" href="https://metacpan.org/dist/Test-Exception">Test-Exception-0.43</a>
  </div>
<span class="river-gauge-gauge">
  <svg width="24px"
       height="15px"
       version="1.1"
       xmlns="http://www.w3.org/2000/svg"
       xmlns:xlink="http://www.w3.org/1999/xlink">

    <g>
      <title>        River stage four &#10;
          • 2204 direct dependents &#10;          • 9231 total dependents
      </title>

      <rect x="0"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="5"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="10"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="15"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="20"  y="0" width="4" height="15" fill="#e4e2e2" />
    </g>
  </svg>

</span>
<div id="Test-Exception-fav" class="logged_in">
<form action="https://metacpan.org/account/favorite/add" style="display: inline" onsubmit="return favDistribution(this)">
    <input type="hidden" name="remove" value="0">
    <input type="hidden" name="release" value="Test-Exception-0.43">
    <input type="hidden" name="author" value="EXODIST">
    <input type="hidden" name="distribution" value="Test-Exception">
    <button type="submit" class="favorite highlight"><span>41</span> ++</button>
</form>
</div>
<div class="logged_out">
<a href="./Test::Exception.html" onclick="alert('Please sign in to add favorites'); return false" class="favorite highlight">
<span>41</span> ++</a>
</div>
   / <span>Test::Exception</span>
</div>
          </div>
          <main class="content">


<nav class="toc">
  <div class="toc-header"><strong>Contents</strong></div>
<ul>
  <li><a href="./Test::Exception.html#NAME">NAME</a></li>
  <li><a href="./Test::Exception.html#SYNOPSIS">SYNOPSIS</a></li>
  <li><a href="./Test::Exception.html#DESCRIPTION">DESCRIPTION</a></li>
  <li><a href="./Test::Exception.html#SKIPPING-TEST::EXCEPTION-TESTS">SKIPPING TEST::EXCEPTION TESTS</a></li>
  <li><a href="./Test::Exception.html#BUGS">BUGS</a></li>
  <li><a href="./Test::Exception.html#COMMUNITY">COMMUNITY</a></li>
  <li><a href="./Test::Exception.html#TO-DO">TO DO</a></li>
  <li><a href="./Test::Exception.html#ACKNOWLEDGMENTS">ACKNOWLEDGMENTS</a></li>
  <li><a href="./Test::Exception.html#AUTHOR">AUTHOR</a></li>
  <li><a href="./Test::Exception.html#SEE-ALSO">SEE ALSO</a></li>
  <li><a href="./Test::Exception.html#LICENCE">LICENCE</a></li>
</ul></nav>
<div class="pod anchors">
<h1 id="NAME">NAME</h1>

<p>Test::Exception - Test exception-based code</p>

<h1 id="SYNOPSIS">SYNOPSIS</h1>

<pre><code>  use Test::More tests =&gt; 5;
  use Test::Exception;

  # or if you don&#39;t need Test::More

  use Test::Exception tests =&gt; 5;

  # then...

  # Check that the stringified exception matches given regex
  throws_ok { $foo-&gt;method } qr/division by zero/, &#39;zero caught okay&#39;;

  # Check an exception of the given class (or subclass) is thrown
  throws_ok { $foo-&gt;method } &#39;Error::Simple&#39;, &#39;simple error thrown&#39;;
  
  # all Test::Exceptions subroutines are guaranteed to preserve the state 
  # of $@ so you can do things like this after throws_ok and dies_ok
  like $@, &#39;what the stringified exception should look like&#39;;

  # Check that something died - we do not care why
  dies_ok { $foo-&gt;method } &#39;expecting to die&#39;;

  # Check that something did not die
  lives_ok { $foo-&gt;method } &#39;expecting to live&#39;;

  # Check that a test runs without an exception
  lives_and { is $foo-&gt;method, 42 } &#39;method is 42&#39;;
  
  # or if you don&#39;t like prototyped functions
  
  throws_ok( sub { $foo-&gt;method }, qr/division by zero/,
      &#39;zero caught okay&#39; );
  throws_ok( sub { $foo-&gt;method }, &#39;Error::Simple&#39;, 
      &#39;simple error thrown&#39; );
  dies_ok( sub { $foo-&gt;method }, &#39;expecting to die&#39; );
  lives_ok( sub { $foo-&gt;method }, &#39;expecting to live&#39; );
  lives_and( sub { is $foo-&gt;method, 42 }, &#39;method is 42&#39; );</code></pre>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

<p>This module provides a few convenience methods for testing exception based code. It is built with <a href="https://metacpan.org/pod/Test::Builder">Test::Builder</a> and plays happily with <a href="https://metacpan.org/pod/Test::More">Test::More</a> and friends.</p>

<p>If you are not already familiar with <a href="https://metacpan.org/pod/Test::More">Test::More</a> now would be the time to go take a look.</p>

<p>You can specify the test plan when you <code>use Test::Exception</code> in the same way as <code>use Test::More</code>. See <a href="https://metacpan.org/pod/Test::More">Test::More</a> for details.</p>

<p>NOTE: Test::Exception only checks for exceptions. It will ignore other methods of stopping program execution - including exit(). If you have an exit() in evalled code Test::Exception will not catch this with any of its testing functions.</p>

<p>NOTE: This module uses <a href="https://metacpan.org/pod/Sub::Uplevel">Sub::Uplevel</a> and relies on overriding <code>CORE::GLOBAL::caller</code> to hide your test blocks from the call stack. If this use of global overrides concerns you, the <a href="https://metacpan.org/pod/Test::Fatal">Test::Fatal</a> module offers a more minimalist alternative.</p>

<dl>

<dt id="throws_ok"><b>throws_ok</b></dt>
<dd>

<p>Tests to see that a specific exception is thrown. throws_ok() has two forms:</p>

<pre><code>  throws_ok BLOCK REGEX, TEST_DESCRIPTION
  throws_ok BLOCK CLASS, TEST_DESCRIPTION</code></pre>

<p>In the first form the test passes if the stringified exception matches the give regular expression. For example:</p>

<pre><code>    throws_ok { read_file( &#39;unreadable&#39; ) } qr/No file/, &#39;no file&#39;;</code></pre>

<p>If your perl does not support <code>qr//</code> you can also pass a regex-like string, for example:</p>

<pre><code>    throws_ok { read_file( &#39;unreadable&#39; ) } &#39;/No file/&#39;, &#39;no file&#39;;</code></pre>

<p>The second form of throws_ok() test passes if the exception is of the same class as the one supplied, or a subclass of that class. For example:</p>

<pre><code>    throws_ok { $foo-&gt;bar } &quot;Error::Simple&quot;, &#39;simple error&#39;;</code></pre>

<p>Will only pass if the <code>bar</code> method throws an Error::Simple exception, or a subclass of an Error::Simple exception.</p>

<p>You can get the same effect by passing an instance of the exception you want to look for. The following is equivalent to the previous example:</p>

<pre><code>    my $SIMPLE = Error::Simple-&gt;new;
    throws_ok { $foo-&gt;bar } $SIMPLE, &#39;simple error&#39;;</code></pre>

<p>Should a throws_ok() test fail it produces appropriate diagnostic messages. For example:</p>

<pre><code>    not ok 3 - simple error
    #     Failed test (test.t at line 48)
    # expecting: Error::Simple exception
    # found: normal exit</code></pre>

<p>Like all other Test::Exception functions you can avoid prototypes by passing a subroutine explicitly:</p>

<pre><code>    throws_ok( sub {$foo-&gt;bar}, &quot;Error::Simple&quot;, &#39;simple error&#39; );</code></pre>

<p>A true value is returned if the test succeeds, false otherwise. On exit $@ is guaranteed to be the cause of death (if any).</p>

<p>A description of the exception being checked is used if no optional test description is passed.</p>

<p>NOTE: Remember when you <code>die $string_without_a_trailing_newline</code> perl will automatically add the current script line number, input line number and a newline. This will form part of the string that throws_ok regular expressions match against.</p>

</dd>
<dt id="dies_ok"><b>dies_ok</b></dt>
<dd>

<p>Checks that a piece of code dies, rather than returning normally. For example:</p>

<pre><code>    sub div {
        my ( $a, $b ) = @_;
        return $a / $b;
    };

    dies_ok { div( 1, 0 ) } &#39;divide by zero detected&#39;;

    # or if you don&#39;t like prototypes
    dies_ok( sub { div( 1, 0 ) }, &#39;divide by zero detected&#39; );</code></pre>

<p>A true value is returned if the test succeeds, false otherwise. On exit $@ is guaranteed to be the cause of death (if any).</p>

<p>Remember: This test will pass if the code dies for any reason. If you care about the reason it might be more sensible to write a more specific test using throws_ok().</p>

<p>The test description is optional, but recommended.</p>

</dd>
<dt id="lives_ok"><b>lives_ok</b></dt>
<dd>

<p>Checks that a piece of code doesn&#39;t die. This allows your test script to continue, rather than aborting if you get an unexpected exception. For example:</p>

<pre><code>    sub read_file {
        my $file = shift;
        local $/;
        open my $fh, &#39;&lt;&#39;, $file or die &quot;open failed ($!)\n&quot;;
        $file = &lt;FILE&gt;;
        return $file;
    };

    my $file;
    lives_ok { $file = read_file(&#39;test.txt&#39;) } &#39;file read&#39;;

    # or if you don&#39;t like prototypes
    lives_ok( sub { $file = read_file(&#39;test.txt&#39;) }, &#39;file read&#39; );</code></pre>

<p>Should a lives_ok() test fail it produces appropriate diagnostic messages. For example:</p>

<pre><code>    not ok 1 - file read
    #     Failed test (test.t at line 15)
    # died: open failed (No such file or directory)</code></pre>

<p>A true value is returned if the test succeeds, false otherwise. On exit $@ is guaranteed to be the cause of death (if any).</p>

<p>The test description is optional, but recommended.</p>

</dd>
<dt id="lives_and"><b>lives_and</b></dt>
<dd>

<p>Run a test that may throw an exception. For example, instead of doing:</p>

<pre><code>  my $file;
  lives_ok { $file = read_file(&#39;answer.txt&#39;) } &#39;read_file worked&#39;;
  is $file, &quot;42&quot;, &#39;answer was 42&#39;;</code></pre>

<p>You can use lives_and() like this:</p>

<pre><code>  lives_and { is read_file(&#39;answer.txt&#39;), &quot;42&quot; } &#39;answer is 42&#39;;
  # or if you don&#39;t like prototypes
  lives_and(sub {is read_file(&#39;answer.txt&#39;), &quot;42&quot;}, &#39;answer is 42&#39;);</code></pre>

<p>Which is the same as doing</p>

<pre><code>  is read_file(&#39;answer.txt&#39;), &quot;42\n&quot;, &#39;answer is 42&#39;;</code></pre>

<p>unless <code>read_file(&#39;answer.txt&#39;)</code> dies, in which case you get the same kind of error as lives_ok()</p>

<pre><code>  not ok 1 - answer is 42
  #     Failed test (test.t at line 15)
  # died: open failed (No such file or directory)</code></pre>

<p>A true value is returned if the test succeeds, false otherwise. On exit $@ is guaranteed to be the cause of death (if any).</p>

<p>The test description is optional, but recommended.</p>

</dd>
</dl>

<h1 id="SKIPPING-TEST::EXCEPTION-TESTS"><a id="SKIPPING"></a>SKIPPING TEST::EXCEPTION TESTS</h1>

<p>Sometimes we want to use Test::Exception tests in a test suite, but don&#39;t want to force the user to have Test::Exception installed. One way to do this is to skip the tests if Test::Exception is absent. You can do this with code something like this:</p>

<pre><code>  use strict;
  use warnings;
  use Test::More;
  
  BEGIN {
      eval &quot;use Test::Exception&quot;;
      plan skip_all =&gt; &quot;Test::Exception needed&quot; if $@;
  }
  
  plan tests =&gt; 2;
  # ... tests that need Test::Exception ...</code></pre>

<p>Note that we load Test::Exception in a <code>BEGIN</code> block ensuring that the subroutine prototypes are in place before the rest of the test script is compiled.</p>

<h1 id="BUGS">BUGS</h1>

<p>There are some edge cases in Perl&#39;s exception handling where Test::Exception will miss exceptions thrown in DESTROY blocks. See the RT bug <a href="http://rt.cpan.org/Ticket/Display.html?id=24678">http://rt.cpan.org/Ticket/Display.html?id=24678</a> for details, along with the t/edge-cases.t in the distribution test suite. These will be addressed in a future Test::Exception release.</p>

<p>If you find any more bugs please let me know by e-mail, or report the problem with <a href="http://rt.cpan.org/">http://rt.cpan.org/</a>.</p>

<h1 id="COMMUNITY">COMMUNITY</h1>

<dl>

<dt id="perl-qa"><a id="perl"></a>perl-qa</dt>
<dd>

<p>If you are interested in testing using Perl I recommend you visit <a href="http://qa.perl.org/">http://qa.perl.org/</a> and join the excellent perl-qa mailing list. See <a href="http://lists.perl.org/showlist.cgi?name=perl-qa">http://lists.perl.org/showlist.cgi?name=perl-qa</a> for details on how to subscribe.</p>

</dd>
<dt id="perlmonks">perlmonks</dt>
<dd>

<p>You can find users of Test::Exception, including the module author, on <a href="http://www.perlmonks.org/">http://www.perlmonks.org/</a>. Feel free to ask questions on Test::Exception there.</p>

</dd>
<dt id="CPAN::Forum"><a id="CPAN"></a>CPAN::Forum</dt>
<dd>

<p>The CPAN Forum is a web forum for discussing Perl&#39;s CPAN modules. The Test::Exception forum can be found at <a href="http://www.cpanforum.com/dist/Test-Exception">http://www.cpanforum.com/dist/Test-Exception</a>.</p>

</dd>
<dt id="AnnoCPAN">AnnoCPAN</dt>
<dd>

<p>AnnoCPAN is a web site that allows community annotations of Perl module documentation. The Test::Exception annotations can be found at <a href="http://annocpan.org/~ADIE/Test-Exception/">http://annocpan.org/~ADIE/Test-Exception/</a>.</p>

</dd>
</dl>

<h1 id="TO-DO"><a id="TO"></a>TO DO</h1>

<p>If you think this module should do something that it doesn&#39;t (or does something that it shouldn&#39;t) please let me know.</p>

<p>You can see my current to do list at <a href="http://adrianh.tadalist.com/lists/public/15421">http://adrianh.tadalist.com/lists/public/15421</a>, with an RSS feed of changes at <a href="http://adrianh.tadalist.com/lists/feed_public/15421">http://adrianh.tadalist.com/lists/feed_public/15421</a>.</p>

<h1 id="ACKNOWLEDGMENTS">ACKNOWLEDGMENTS</h1>

<p>Thanks to chromatic and Michael G Schwern for the excellent Test::Builder, without which this module wouldn&#39;t be possible.</p>

<p>Thanks to Adam Kennedy, Andy Lester, Aristotle Pagaltzis, Ben Prew, Cees Hek, Chris Dolan, chromatic, Curt Sampson, David Cantrell, David Golden, David Tulloh, David Wheeler, J. K. O&#39;Brien, Janek Schleicher, Jim Keenan, Jos I. Boumans, Joshua ben Jore, Jost Krieger, Mark Fowler, Michael G Schwern, Nadim Khemir, Paul McCann, Perrin Harkins, Peter Rabbitson, Peter Scott, Ricardo Signes, Rob Muhlestein, Scott R. Godin, Steve Purkis, Steve, Tim Bunce, and various anonymous folk for comments, suggestions, bug reports and patches.</p>

<h1 id="AUTHOR">AUTHOR</h1>

<p>Adrian Howard &lt;adrianh@quietstars.com&gt;</p>

<p>If you can spare the time, please drop me a line if you find this module useful.</p>

<h1 id="SEE-ALSO"><a id="SEE"></a>SEE ALSO</h1>

<dl>

<dt id="http://del.icio.us/tag/Test::Exception"><a id="http"></a><a id="http:-del.icio.us-tag-Test::Exception"></a><a href="http://del.icio.us/tag/Test::Exception">http://del.icio.us/tag/Test::Exception</a></dt>
<dd>

<p>Delicious links on Test::Exception.</p>

</dd>
<dt id="Test::Fatal"><a id="Test"></a><a href="https://metacpan.org/pod/Test::Fatal">Test::Fatal</a></dt>
<dd>

<p>A slightly different interface to testing exceptions, without overriding <code>CORE::caller</code>.</p>

</dd>
<dt id="Test::Warnings-&amp;-Test::Warn-&amp;-Test::NoWarnings"><a id="Test1"></a><a id="Test::Warnings---Test::Warn---Test::NoWarnings"></a><a href="https://metacpan.org/pod/Test::Warnings">Test::Warnings</a> &amp; <a href="https://metacpan.org/pod/Test::Warn">Test::Warn</a> &amp; <a href="https://metacpan.org/pod/Test::NoWarnings">Test::NoWarnings</a></dt>
<dd>

<p>Modules to help test warnings.</p>

</dd>
<dt id="Test::Builder"><a id="Test2"></a><a href="https://metacpan.org/pod/Test::Builder">Test::Builder</a></dt>
<dd>

<p>Support module for building test libraries.</p>

</dd>
<dt id="Test::Simple-&amp;-Test::More"><a id="Test3"></a><a id="Test::Simple---Test::More"></a><a href="https://metacpan.org/pod/Test::Simple">Test::Simple</a> &amp; <a href="https://metacpan.org/pod/Test::More">Test::More</a></dt>
<dd>

<p>Basic utilities for writing tests.</p>

</dd>
<dt id="http://qa.perl.org/test-modules.html"><a id="http1"></a><a id="http:-qa.perl.org-test-modules.html"></a><a href="http://qa.perl.org/test-modules.html">http://qa.perl.org/test-modules.html</a></dt>
<dd>

<p>Overview of some of the many testing modules available on CPAN.</p>

</dd>
<dt id="http://del.icio.us/tag/perl+testing"><a id="http2"></a><a id="http:-del.icio.us-tag-perl-testing"></a><a href="http://del.icio.us/tag/perl+testing">http://del.icio.us/tag/perl+testing</a></dt>
<dd>

<p>Delicious links on perl testing.</p>

</dd>
</dl>

<h1 id="LICENCE">LICENCE</h1>

<p>Copyright 2002-2007 Adrian Howard, All Rights Reserved.</p>

<p>This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.</p></div>

<div id="metacpan_install-instructions-dialog" class="modal fade">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Module Install Instructions</h4>
      </div>
      <div class="modal-body">
        <p>To install Test::Exception, copy and paste the appropriate command in to your terminal.</p>
        <p><a href="https://metacpan.org/dist/App-cpanminus/view/bin/cpanm">cpanm</a></p>
        <pre><code>cpanm Test::Exception</code></pre>
        <p><a href="https://metacpan.org/pod/CPAN">CPAN shell</a></p>
        <pre><code>perl -MCPAN -e shell
install Test::Exception</code></pre>
        <p>For more information on module installation, please visit <a href="https://www.cpan.org/modules/INSTALL.html">the detailed CPAN module installation guide</a>.</p>
      </div>
      <div class="modal-footer">
        <a href="./Test::Exception.html#" data-dismiss="modal" class="btn">Close</a>
      </div>
    </div>
  </div>
</div>
          </main>
          <div class="content-pagination">
          </div>
        </div>
        <footer class="footer">
          <div class="footer-container">
            <div class="footer-social">
              <div class="footer-link footer-logo">
                <a href="https://metacpan.org/">
                  <img src="https://metacpan.org/static/images/metacpan-logo.svg" alt="MetaCPAN" />
                </a>
              </div>
              <a class="footer-social-link" href="https://github.com/metacpan">
                <i class="fab fa-github-square"></i>
              </a>
              <a class="footer-social-link" href="https://fosstodon.org/@metacpan">
                <i class="fab fa-mastodon"></i>
              </a>
            </div>
            <div class="footer-links">
              <div class="footer-link">
                  <a href="https://metacpan.org/about">About</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/sponsors">Sponsor</a>
              </div>
              <div class="footer-link">
                  <a href="https://grep.metacpan.org">grep::cpan</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/recent">Recent</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/faq">FAQ</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/tools">Tools</a>
              </div>
              <div class="footer-link">
                  <a href="https://fastapi.metacpan.org/">API</a>
              </div>
              <div class="footer-link">
                  <a href="https://www.perl.org/">Perl.org</a>
              </div>
            </div>
            <div class="footer-sponsors">
              <a class="footer-sponsor-link" target="_blank" href="https://www.bytemark.co.uk/" rel="noopener">
                <img class="footer-sponsor-bytemark" src="https://metacpan.org/static/images/sponsors/bytemark_logo.svg" alt="Bytemark logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.liquidweb.com/" rel="noopener">
                <img class="footer-sponsor-liquidweb" src="https://metacpan.org/static/images/sponsors/liquidweb_logo.png" alt="liquidweb logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://deriv.com/careers/" rel="noopener">
                <img class="footer-sponsor-deriv" src="https://metacpan.org/static/images/sponsors/deriv.svg" alt="Deriv logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://geocode.xyz" rel="noopener">
                <img class="footer-sponsor-geocode" src="https://metacpan.org/static/images/sponsors/geocodelogo.svg" alt="Geocode logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.fastly.com/" rel="noopener">
                <img class="footer-sponsor-fastly" src="https://metacpan.org/static/images/sponsors/fastly_logo.svg" alt="Fastly logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://opencagedata.com" rel="noopener">
                <img class="footer-sponsor-opencage" src="https://metacpan.org/static/images/sponsors/open-cage.svg" alt="OpenCage logo">
              </a>
            </div>
          </div>
        </footer>
        <div class="modal fade" tabindex="-1" role="dialog" id="metacpan_keyboard-shortcuts">
          <div class="modal-dialog">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">Keyboard Shortcuts</h4>
              </div>
              <div class="modal-body row">
<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Global</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>s</kbd>
        </td>
        <td>Focus search bar</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>?</kbd>
        </td>
        <td>Bring up this help dialog</td>
      </tr>
    </tbody>
  </table>

  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>GitHub</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>p</kbd>
        </td>
        <td>Go to pull requests</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>go to github issues (only if github is preferred repository)</td>
      </tr>
    </tbody>
  </table>
</div>

<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>POD</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>a</kbd>
        </td>
        <td>Go to author</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>c</kbd>
        </td>
        <td>Go to changes</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>Go to issues</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>d</kbd>
        </td>
        <td>Go to dist</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>r</kbd>
        </td>
        <td>Go to repository/SCM</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>s</kbd>
        </td>
        <td>Go to source</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>b</kbd>
        </td>
        <td>Go to file browse</td>
      </tr>

    </tbody>
  </table>
</div>

<div class="col-md-12">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Search terms</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><em>module:</em> (e.g. <a href="https://metacpan.org/search?q=module%3APlugin">module:Plugin</a>)</td>
      </tr>
      <tr>
        <td><em>distribution:</em> (e.g. <a href="https://metacpan.org/search?q=distribution%3ADancer+auth">distribution:Dancer auth</a>)</td>
      </tr>
      <tr>
        <td><em>author:</em> (e.g. <a href="https://metacpan.org/search?q=author%3ASONGMU+Redis">author:SONGMU Redis</a>)</td>
      </tr>
      <tr>
        <td><em>version:</em> (e.g. <a href="https://metacpan.org/search?q=version%3A1.00">version:1.00</a>)</td>
      </tr>
    </tbody>
  </table>
</div>
              </div>
              <div class="modal-footer"></div>
            </div>
          </div>
        </div>
    </body>
</html>
